
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <#assign base=request.contextPath  />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title></title>
    <link rel="stylesheet" href="${base}/frame/layui/css/layui.css">
    <link rel="stylesheet" href="${base}/frame/static/css/style.css">
    <link rel="icon" href="${base}/frame/static/image/code.png">
    <script type="text/javascript" src="${base}/frame/layui/layui.js"></script>
</head>
<body class="body">
<div class="ziyemianbiju">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>{<TableName>}</legend>
    </fieldset>
    <div class="layui-col-xs12 layui-col-sm10 layui-col-md10">
        <div class="my-btn-box">
            <span  id="layerDemo">
                <span class="layui-form-label">企业成员</span>
                <div class="layui-input-inline">
                    <input type="text" autocomplete="off" placeholder="手机号" class="layui-input" style="height: 31px;">
                </div>
                <div class="layui-input-inline">
                    <input type="text" autocomplete="off" placeholder="请输入搜索条件" class="layui-input" style="height: 31px;">
                </div>
                	<button class="layui-btn  layui-btn-sm">查询</button>
	                <button data-method="offset" data-type="auto" class="layui-btn layui-btn-primary">添加成员</button>
	                <button class="layui-btn layui-btn-danger">批量分配资金</button>
            </span>
            <table class="layui-hide" id="test" lay-filter="test"></table>
            <script type="text/html" id="phoneTpl">
                <a  class="layui-table-link" target="">{{ d.phoneTpl}}</a>
            </script>
            <script type="text/html" id="barDemo">
                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</a>
                <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">分配资源</button>
                    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">回收资产</a>
                    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button>
            </script>
        </div>
    </div>
    <script type="text/javascript">
        layui.use(['layer','form','table'], function(){
            var form = layui.form;
            var table = layui.table;
            var layer = layui.layer;
            var $ = layui.jquery;
            table.render({
                elem: '#test'
                ,url: ''//数据接口
                ,toolbar: '#toolbarDemo'
                ,title: '用户数据表'
                ,defaultToolbar: ['filter', 'print', 'exports']
                ,cols: [[
                    {<Table>}
                ]]
                ,id: 'testReload'
                ,width:1100
                ,page: true
            });
            //触发事件
            var active = {
                offset: function(othis){
                    var type = othis.data('type')
                            ,text = othis.text();
                    layer.open({
                        type: 1
                        ,title: '添加成员'
                        ,offset: type
                        ,area: ['360px', '360px']
                        ,shadeClose: true
                        ,id: 'layerDemo'+type //防止重复弹出
                        ,content: '<div style="padding:10px;">'+
                        '<div class="layui-form-item"><div class="layui-inline">'+
                        '<label class="layui-form-label"><a style="color:red">*</a>&nbsp;手机号</label>'+
                        ' <div class="layui-input-inline">'+
                        '<input name="number" id="sname" lay-verify="required" autocomplete="off" class="layui-input" type="text">'+
                        '</div>'+
                        '</div>'+
                        '<div class="layui-inline">'+
                        '<label class="layui-form-label"><a style="color:red">*</a>&nbsp;添加时间</label>'+
                        '<div class="layui-input-inline">'+
                        '<input name="date" id="date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input" type="text">'+
                        '</div>'+
                        ' </div>'+
                        '<div class="layui-inline">'+
                        '<label class="layui-form-label"><a style="color:red">*</a>&nbsp;账户余额</label>'+
                        '<div class="layui-input-inline">'+
                        ' <input name="number" id="sname" lay-verify="required" autocomplete="off" class="layui-input" type="text">'+
                        '  </div>'+
                        '   </div>'+
                        '<div class="layui-inline">'+
                        '<label class="layui-form-label"><a style="color:red">*</a>&nbsp;充值累计</label>'+
                        '<div class="layui-input-inline">'+
                        '<input name="number" id="sname" lay-verify="required" autocomplete="off" class="layui-input" type="text">'+
                        '</div>'+
                        '</div>'+
                        '<div class="layui-inline">'+
                        '<label class="layui-form-label"><a style="color:red">*</a>&nbsp;可回收资产</label>'+
                        '<div class="layui-input-inline">'+
                        '<input name="number" id="sname" lay-verify="required" autocomplete="off" class="layui-input" type="text">'+
                        '</div>'+
                        '</div>'+
                        '</div></div>'
                        ,btn: ['立即提交','重置']
                        ,btnAlign: 'r' //按钮居中
                        ,yes: function(index, layero){
                            layer.closeAll();
                        }
                        ,btn2: function(index, layero){
                            return false
                        }
                    });
                }
            };

            $('#layerDemo .layui-btn').on('click', function(){
                var othis = $(this), method = othis.data('method');
                active[method] ? active[method].call(this, othis) : '';
            });
        });
    </script>

</body>
</html>